import request from '@/utils/request'

// 查询返佣规则列表
export function listRebateRule(query) {
  return request({
    url: '/ruoyi/rebateRule/list',
    method: 'get',
    params: query
  })
}

// 查询返佣规则详细
export function getRebateRule(ruleId) {
  return request({
    url: '/ruoyi/rebateRule/' + ruleId,
    method: 'get'
  })
}

// 新增返佣规则
export function addRebateRule(data) {
  return request({
    url: '/ruoyi/rebateRule',
    method: 'post',
    data: data
  })
}

// 修改返佣规则
export function updateRebateRule(data) {
  return request({
    url: '/ruoyi/rebateRule',
    method: 'put',
    data: data
  })
}

// 删除返佣规则
export function delRebateRule(ruleId) {
  return request({
    url: '/ruoyi/rebateRule/' + ruleId,
    method: 'delete'
  })
}
